package com.xiaojie.hystrix.command;

import com.netflix.hystrix.HystrixCommand;
import com.netflix.hystrix.HystrixCommandGroupKey;
import com.netflix.hystrix.HystrixThreadPoolKey;

/**
 * @author wangye
 * @classname MyHystrixCommand
 * @date 2021/6/9 14:46
 **/
public class MyHystrixCommand extends HystrixCommand<String> {
    protected MyHystrixCommand(HystrixCommandGroupKey group) {
        super(group);
    }

    protected MyHystrixCommand(HystrixCommandGroupKey group, HystrixThreadPoolKey threadPool) {
        super(group, threadPool);
    }

    protected MyHystrixCommand(HystrixCommandGroupKey group, int executionIsolationThreadTimeoutInMilliseconds) {
        super(group, executionIsolationThreadTimeoutInMilliseconds);
    }

    protected MyHystrixCommand(HystrixCommandGroupKey group, HystrixThreadPoolKey threadPool, int executionIsolationThreadTimeoutInMilliseconds) {
        super(group, threadPool, executionIsolationThreadTimeoutInMilliseconds);
    }

    protected MyHystrixCommand(Setter setter) {
        super(setter);
    }

    @Override
    protected String run() throws Exception {
        return "MyHystrixCommand Run";
    }

    @Override
    protected String getFallback() {
        return "MyHystrixCommand fall back";
    }


}
